package com.doublefish.doublefishrobot.utils.db.database.bean;

import java.util.HashMap;
import java.util.Map;

/**
 * 作者:dugaofeng on 2024/10/16 14:42
 */
public class TableInfoModel {

    // 保存所有表结构字段名，key为表名，value为Map
    // 结构为 {tableName : [field_name1:filet_ype1,field_name2:filed_type2...]}
    private Map<String, Map<String,Integer>> mFieldsOfTable = new HashMap<>();

    public void saveFieldsOfTable(String sTableName, Map<String,Integer> oFieldsOfTable)
    {
        mFieldsOfTable.put(sTableName, oFieldsOfTable);
    }

    public Map<String,Integer> getFieldsOfTable(String sTableName)
    {
        if (!mFieldsOfTable.containsKey(sTableName))
            return null;

        return mFieldsOfTable.get(sTableName);
    }
}
